/* This file was generated by upbc (the upb compiler) from the input
 * file:
 *
 *     envoy/extensions/filters/http/router/v3/router.proto
 *
 * Do not edit -- your changes will be discarded when the file is
 * regenerated. */

#ifndef ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPB_H_
#define ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPB_H_

#include "upb/msg_internal.h"
#include "upb/decode.h"
#include "upb/decode_fast.h"
#include "upb/encode.h"

#include "upb/port_def.inc"

#ifdef __cplusplus
extern "C" {
#endif

struct envoy_extensions_filters_http_router_v3_Router;
typedef struct envoy_extensions_filters_http_router_v3_Router envoy_extensions_filters_http_router_v3_Router;
extern const upb_MiniTable envoy_extensions_filters_http_router_v3_Router_msginit;
struct envoy_config_accesslog_v3_AccessLog;
struct google_protobuf_BoolValue;
extern const upb_MiniTable envoy_config_accesslog_v3_AccessLog_msginit;
extern const upb_MiniTable google_protobuf_BoolValue_msginit;



/* envoy.extensions.filters.http.router.v3.Router */

UPB_INLINE envoy_extensions_filters_http_router_v3_Router* envoy_extensions_filters_http_router_v3_Router_new(upb_Arena* arena) {
  return (envoy_extensions_filters_http_router_v3_Router*)_upb_Message_New(&envoy_extensions_filters_http_router_v3_Router_msginit, arena);
}
UPB_INLINE envoy_extensions_filters_http_router_v3_Router* envoy_extensions_filters_http_router_v3_Router_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_filters_http_router_v3_Router* ret = envoy_extensions_filters_http_router_v3_Router_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_filters_http_router_v3_Router_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_filters_http_router_v3_Router* envoy_extensions_filters_http_router_v3_Router_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_filters_http_router_v3_Router* ret = envoy_extensions_filters_http_router_v3_Router_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_filters_http_router_v3_Router_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_filters_http_router_v3_Router_serialize(const envoy_extensions_filters_http_router_v3_Router* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_filters_http_router_v3_Router_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_filters_http_router_v3_Router_serialize_ex(const envoy_extensions_filters_http_router_v3_Router* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_filters_http_router_v3_Router_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_has_dynamic_stats(const envoy_extensions_filters_http_router_v3_Router* msg) {
  return _upb_hasbit(msg, 1);
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_clear_dynamic_stats(const envoy_extensions_filters_http_router_v3_Router* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const upb_Message*) = NULL;
}
UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_http_router_v3_Router_dynamic_stats(const envoy_extensions_filters_http_router_v3_Router* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_BoolValue*);
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_clear_start_child_span(const envoy_extensions_filters_http_router_v3_Router* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0;
}
UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_start_child_span(const envoy_extensions_filters_http_router_v3_Router* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
}
UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_has_upstream_log(const envoy_extensions_filters_http_router_v3_Router* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16));
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_clear_upstream_log(const envoy_extensions_filters_http_router_v3_Router* msg) {
  _upb_array_detach(msg, UPB_SIZE(12, 16));
}
UPB_INLINE const struct envoy_config_accesslog_v3_AccessLog* const* envoy_extensions_filters_http_router_v3_Router_upstream_log(const envoy_extensions_filters_http_router_v3_Router* msg, size_t* len) {
  return (const struct envoy_config_accesslog_v3_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_clear_suppress_envoy_headers(const envoy_extensions_filters_http_router_v3_Router* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = 0;
}
UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_suppress_envoy_headers(const envoy_extensions_filters_http_router_v3_Router* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool);
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_clear_strict_check_headers(const envoy_extensions_filters_http_router_v3_Router* msg) {
  _upb_array_detach(msg, UPB_SIZE(16, 24));
}
UPB_INLINE upb_StringView const* envoy_extensions_filters_http_router_v3_Router_strict_check_headers(const envoy_extensions_filters_http_router_v3_Router* msg, size_t* len) {
  return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len);
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_clear_respect_expected_rq_timeout(const envoy_extensions_filters_http_router_v3_Router* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = 0;
}
UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_respect_expected_rq_timeout(const envoy_extensions_filters_http_router_v3_Router* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool);
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_clear_suppress_grpc_request_failure_code_stats(const envoy_extensions_filters_http_router_v3_Router* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = 0;
}
UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_suppress_grpc_request_failure_code_stats(const envoy_extensions_filters_http_router_v3_Router* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool);
}

UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_dynamic_stats(envoy_extensions_filters_http_router_v3_Router *msg, struct google_protobuf_BoolValue* value) {
  _upb_sethas(msg, 1);
  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_http_router_v3_Router_mutable_dynamic_stats(envoy_extensions_filters_http_router_v3_Router* msg, upb_Arena* arena) {
  struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_http_router_v3_Router_dynamic_stats(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_BoolValue*)_upb_Message_New(&google_protobuf_BoolValue_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_filters_http_router_v3_Router_set_dynamic_stats(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_start_child_span(envoy_extensions_filters_http_router_v3_Router *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_extensions_filters_http_router_v3_Router_mutable_upstream_log(envoy_extensions_filters_http_router_v3_Router* msg, size_t* len) {
  return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_extensions_filters_http_router_v3_Router_resize_upstream_log(envoy_extensions_filters_http_router_v3_Router* msg, size_t len, upb_Arena* arena) {
  return (struct envoy_config_accesslog_v3_AccessLog**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog* envoy_extensions_filters_http_router_v3_Router_add_upstream_log(envoy_extensions_filters_http_router_v3_Router* msg, upb_Arena* arena) {
  struct envoy_config_accesslog_v3_AccessLog* sub = (struct envoy_config_accesslog_v3_AccessLog*)_upb_Message_New(&envoy_config_accesslog_v3_AccessLog_msginit, arena);
  bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 16), UPB_SIZE(2, 3), &sub, arena);
  if (!ok) return NULL;
  return sub;
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_suppress_envoy_headers(envoy_extensions_filters_http_router_v3_Router *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE upb_StringView* envoy_extensions_filters_http_router_v3_Router_mutable_strict_check_headers(envoy_extensions_filters_http_router_v3_Router* msg, size_t* len) {
  return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len);
}
UPB_INLINE upb_StringView* envoy_extensions_filters_http_router_v3_Router_resize_strict_check_headers(envoy_extensions_filters_http_router_v3_Router* msg, size_t len, upb_Arena* arena) {
  return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 24), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_add_strict_check_headers(envoy_extensions_filters_http_router_v3_Router* msg, upb_StringView val, upb_Arena* arena) {
  return _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 24), UPB_SIZE(3, 4), &val, arena);
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_respect_expected_rq_timeout(envoy_extensions_filters_http_router_v3_Router *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_suppress_grpc_request_failure_code_stats(envoy_extensions_filters_http_router_v3_Router *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}

extern const upb_MiniTable_File envoy_extensions_filters_http_router_v3_router_proto_upb_file_layout;

#ifdef __cplusplus
}  /* extern "C" */
#endif

#include "upb/port_undef.inc"

#endif  /* ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPB_H_ */
